/*
 * Project : PL/X Compiler
 * Date : 21/11/2011
 *	Author : Fu Jie
 * SID: 10072130141		
 * E-mail: fujie1988@gmail.com
 * Website: http://ajayjay.com
 */

#include "plxc.h"

char* FILENAME = {"source.plx"};

int main( int argc , char *argv[] )
{
	if ( argc>1 )
	{
		FILENAME=argv[1];
	}
	init();
	if(openFile(FILENAME) == NULL)
	{
		Error("Failed in open source file!\n");
		getchar();
		return 0;
	}
	getsym();
	prog();
	if(noerror())
	{
		listall();
		interpret();
	}
	else printf("\n\n############Error in Terminal Program############");
	closeFile();
	getchar();
	return 0;
}
